PROJECTENGRAM

TOTAL PROBABILITY RULE

Tags: #◇Computer Science #◇STT101A #◇Conceptual #◇Total Probability Rule


◇Overview

The Total Probability Rule (Law of Total Probability) computes the unconditional (marginal) probability P(A)P(A) of a target event AA by conditioning on a collection of mutually exclusive and collectively exhaustive scenarios {B1,B2,…,Bk}\{B_1, B_2, \dots, B_k\} that form a partition of the sample space SS.

◇Key Definitions

  • General Formula (for Partition {B1,…,Bk}\{B_1, \dots, B_k\}):
    P(A)=∑i=1kP(A∩Bi)=∑i=1kP(A∣Bi)P(Bi)P(A) = \sum_{i=1}^k P(A \cap B_i) = \sum_{i=1}^k P(A \mid B_i) P(B_i)
  • Binary Partition Form ({B,Bc}\{B, B^c\}):
    P(A)=P(A∣B)P(B)+P(A∣Bc)P(Bc)P(A) = P(A \mid B)P(B) + P(A \mid B^c)P(B^c)
  • Role in Bayes' Theorem: The Law of Total Probability provides the normalizing denominator P(A)P(A) in Bayes' Rule: P(Bj∣A)=P(A∣Bj)P(Bj)∑i=1kP(A∣Bi)P(Bi)P(B_j \mid A) = \frac{P(A \mid B_j)P(B_j)}{\sum_{i=1}^k P(A \mid B_i)P(B_i)}.

◇Worked Example

Problem: An e-commerce cluster routes 50%50\% of requests to Server B1B_1, 30%30\% to Server B2B_2, and 20%20\% to Server B3B_3. Timeout rates on the three servers are P(T∣B1)=0.01P(T \mid B_1) = 0.01, P(T∣B2)=0.02P(T \mid B_2) = 0.02, and P(T∣B3)=0.05P(T \mid B_3) = 0.05. What is the overall probability P(T)P(T) that a randomly arriving request times out?

Solution:
P(T)=P(T∣B1)P(B1)+P(T∣B2)P(B2)+P(T∣B3)P(B3)P(T) = P(T \mid B_1)P(B_1) + P(T \mid B_2)P(B_2) + P(T \mid B_3)P(B_3)
P(T)=(0.01)(0.50)+(0.02)(0.30)+(0.05)(0.20)=0.005+0.006+0.010=0.021(2.1%)P(T) = (0.01)(0.50) + (0.02)(0.30) + (0.05)(0.20) = 0.005 + 0.006 + 0.010 = 0.021 \quad (2.1\%)

◇References & Navigation

CONFIRMATION // 理解度の確認

ACTIVE RECALL VERIFICATION

Select an answer to verify conceptual comprehension and reveal the technical rationale.

Q1

What condition MUST the events B1,B2,…,BkB_1, B_2, \dots, B_k satisfy for the Law of Total Probability P(A)=∑i=1kP(A∣Bi)P(Bi)P(A) = \sum_{i=1}^k P(A \mid B_i)P(B_i) to hold?

Q2

Suppose 70%70\% of emails arriving at a gateway are legitimate (LL) and 30%30\% are spam (SS). A keyword filter flags 80%80\% of spam emails (P(F∣S)=0.80P(F \mid S) = 0.80) and falsely flags 5%5\% of legitimate emails (P(F∣L)=0.05P(F \mid L) = 0.05). What is the total probability P(F)P(F) that an incoming email is flagged?

Q3

In a probability tree diagram where the first stage branches into B1,…,BkB_1, \dots, B_k and the second stage branches into AA and AcA^c, how does the Law of Total Probability compute P(A)P(A)?

Q4

Why is P(A)P(A) in the Law of Total Probability interpretable as a weighted average of the conditional probabilities P(A∣Bi)P(A \mid B_i)?

Q5

Box 1 has 33 red and 11 blue ball; Box 2 has 11 red and 33 blue balls. A fair coin is tossed to pick a box (P(B1)=P(B2)=0.5P(B_1) = P(B_2) = 0.5), and one ball is drawn. What is the total probability of drawing a red ball?